<SCRIPT LANGUAGE="JavaScript">
<!--
function countMyself() {
    alert(++countMyself.counter);    
}
countMyself.counter = 0;

//-->
</SCRIPT>
<input type='button' value='First' onclick='(new countMyself());' />
<br/>
<input type='button' value='First' onclick='(new countMyself());' />